package cn.tedu.springbootdemo.service;

import cn.tedu.springbootdemo.bean.Post;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Service
public class PostService {
    public List<Post> findAllPosts(){
        List<Post> postList = new ArrayList<>();

        postList.add(new Post(1, "孙悟空", LocalDateTime.now(),
                "今天去了一下天宫"));
        postList.add(new Post(2, "猪八戒", LocalDateTime.now(),
                "今天去了高老庄"));
        postList.add(new Post(3, "沙僧", LocalDateTime.now(),
                "今天去了河里"));
        postList.add(new Post(4, "白龙马", LocalDateTime.now(),
                "今天去了一下海里"));

        return postList;
    }
}
